package com.zhitong.ztblog.entity;


import com.zhitong.ztblog.utils.DateUtil;

import java.util.Date;

public class Comment {
    private int id;
    private int bid;
    private Blog blog;
    private String nickName;
    private String content;
    private String createTime;

    public Blog getBlog() {
        return blog;
    }

    public void setBlog(Blog blog) {
        this.blog = blog;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNickName() {
        return nickName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        String format = DateUtil.format(createTime, "yyyy-MM-dd HH:mm:ss");
        this.createTime = format;
    }

    public int getBid() {
        return bid;
    }

    public void setBid(int bid) {
        this.bid = bid;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", bid=" + bid +
                ", nickName='" + nickName + '\'' +
                ", content='" + content + '\'' +
                ", createTime='" + createTime + '\'' +
                '}';
    }
}
